It is perfectly legal to modify a character in a string like that - however, it is not legal to modify a string constant.
Code:
char* str = "hello world";
That code sets str to point to the string literal "hello world" in the read only data segment of your program.
You'll have to malloc some memory and use strcpy(), or use an array.
Code:
char* filename = new char[14];
strcpy(filename, "frame0000.tif";
++filename[8];
delete[] filename;
or
Code:
char filename[] = "frame0000.tif";
++filename[8];
Personally, I would just use a std::string:
Code:
std::string filename("frame0000.tif");
++filename[8];
Hope that helps.